<%@page import="br.com.Modelo.UsuarioCliente"%>
<%@page import="br.com.Modelo.UsuarioComerciante"%>
<%@page import="br.com.Dao.UsuarioClienteDao"%>
<%@page import="br.com.Dao.UsuarioComercianteDao"%>
<%@page import="java.io.IOException"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Mercado Catalão</title>
        <!-- Bootstrap Core CSS -->
    
    <link href="bootstrap/css/bootstrap.css" rel="stylesheet">
    
    <script type="text/javascript" src="bootstrap/js/bootstrap.js"></script>
<style type="text/css">
.topo{
width:100%;
height:260px;
margin-bottom: 20px;
margin-top: -20px;
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	
}

#banner{
    margin-top: 20px;
    margin-left: 340px;
    border: 2px solid #eee;

}

#box{

transition: all 0.4s linear;
  -webkit-transition: all 0.4s linear;
  -moz-transition: all 0.4s linear;
  -o-transition: all 0.4s linear;
  -ms-transition: all 0.4s linear;
  opacity: 1;
}
#box:hover{

/*box-shadow: 0 1px 15px #777;*/
box-shadow: rgba(0, 0, 0, 0.1) 0px 5px 5px 2px;

 background: rgba(200, 200, 200, 0.1);
cursor: pointer;

}


</style>
</head>

<body>

<%
	//allow access only if session exists
	String[] id= (String[]) session.getAttribute("user");
	UsuarioCliente userCliente = null;
	UsuarioComerciante userComerciante = null;
	UsuarioClienteDao dao = new UsuarioClienteDao();
	UsuarioComercianteDao dao1 = new UsuarioComercianteDao();
	if(id != null){
		out.print(id[0]+"->"+id[1]);
		if(id[1].equals("1")){
		
			userCliente = dao.validaAutenticacaoUser(Long.parseLong(id[0]), Integer.parseInt(id[1]));
		
		}else{
			
			userComerciante = dao1.validaAutenticacaoUser(Long.parseLong(id[0]), Integer.parseInt(id[1]));
		}
	}
	String userName = null;
	String sessionID = null;
	Cookie[] cookies = request.getCookies();
	if(cookies !=null){
	for(Cookie cookie : cookies){
		if(cookie.getName().equals("user")) userName = cookie.getValue();
		if(cookie.getName().equals("JSESSIONID")) sessionID = cookie.getValue();
	}
}
	if(userCliente != null || userComerciante != null){
		if(userCliente == null){
			out.print("Login : "+userComerciante.getLogin());
		}else{
			out.print("Login : "+userCliente.getLogin());			
		}
		
	}	
%>

      

 <%@ include file="../menu.jsp" %>
<script>

//document.write(window.location.pathname);
</script>
 <!-- cabeçalho -->
  <!-- estrutura -->
<div class="row" id="box2">

    <div class="col-md-3" align="left">
    <div class="panel panel-default">
    <div class="panel-body">
      Descriçao sobre a loja<br/><br/>
        <address>
        <strong>Twitter, Inc.</strong><br>
          795 Folsom Ave, Suite 600<br>
          San Francisco, CA 94107<br>
        <span class="glyphicon glyphicon-earphone"></span>
        <abbr title="Phone">P:</abbr> (123) 456-7890
      </address>
      <address>
        <strong>Full Name</strong><br>
        <a href="mailto:#">first.last@example.com</a>
      </address>
      Descriçao sobre a loja<br/><br/>
        <address>
        <strong>Twitter, Inc.</strong><br>
          795 Folsom Ave, Suite 600<br>
          San Francisco, CA 94107<br>
        <span class="glyphicon glyphicon-earphone"></span>
        <abbr title="Phone">P:</abbr> (123) 456-7890
      </address>
      <address>
        <strong>Full Name</strong><br>
        <a href="mailto:#">first.last@example.com</a>
      </address>
      </div>
  </div>
</div>

<div class="topo">
  <div id="banner">
  
      <img src="img/clickcatalao/bannerclick.jpg" align="bottom" height="280px" width="917px">
     
  </div>
   
</div>
 
 <div class="col-md-3" align="left">
    <div class="panel panel-default">
    <div class="panel-body">
      Descriçao sobre a loja<br/><br/>
        <address>
        <strong>Twitter, Inc.</strong><br>
          795 Folsom Ave, Suite 600<br>
          San Francisco, CA 94107<br>
        <span class="glyphicon glyphicon-earphone"></span>
        <abbr title="Phone">P:</abbr> (123) 456-7890
      </address>
      <address>
        <strong>Full Name</strong><br>
        <a href="mailto:#">first.last@example.com</a>
      </address>
      </div>
  </div>
</div>


  <div class="col-md-9">
  <div class="page-header">
  <h3>Produtos</h3>
  </div>
  
   <div class="col-md-3" >
    <div class="thumbnail" id="box">
      <img src="http://renswijnmalen.nl/bootstrap/desktop_mobile.png" alt="..."/>
      <div class="caption">
        <h3>Thumbnail label</h3>
        <p>...</p>
        <p><a href="#" type="button" class="btn btn-primary">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
      </div>
    </div>
  </div>
  
    <div class="col-md-3" >
    <div class="thumbnail" id="box">
      <img src="http://renswijnmalen.nl/bootstrap/desktop_mobile.png" alt="..."/>
      <div class="caption">
        <h3>Thumbnail label</h3>
        <p>...</p>
        <p><a href="#" type="button" class="btn btn-primary">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
      </div>
    </div>
  </div>
  
   <div class="col-md-3" >
    <div class="thumbnail" id="box">
      <img src="http://renswijnmalen.nl/bootstrap/desktop_mobile.png" alt="..."/>
      <div class="caption">
        <h3>Thumbnail label</h3>
        <p>...</p>
        <p><a href="#" type="button" class="btn btn-primary">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
      </div>
    </div>
  </div>
  
   <div class="col-md-3" >
    <div class="thumbnail" id="box">
      <img src="http://renswijnmalen.nl/bootstrap/desktop_mobile.png" alt="..."/>
      <div class="caption">
        <h3>Thumbnail label</h3>
        <p>...</p>
        <p><a href="#" type="button" class="btn btn-primary">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
      </div>
    </div>
  </div>
  
     <div class="col-md-3" >
    <div class="thumbnail" id="box">
      <img src="http://renswijnmalen.nl/bootstrap/desktop_mobile.png"alt="..."/>
      <div class="caption">
        <h3>Thumbnail label</h3>
        <p>...</p>
        <p><a href="#" type="button" class="btn btn-primary">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
      </div>
    </div>
  </div>
  
   <div class="col-md-3" >
    <div class="thumbnail" id="box">
      <img src="http://renswijnmalen.nl/bootstrap/desktop_mobile.png" alt="..."/>
      <div class="caption">
        <h3>Thumbnail label</h3>
        <p>...</p>
        <p><a href="#" type="button" class="btn btn-primary">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
      </div>
    </div>
  </div>
  
   <div class="col-md-3" >
    <div class="thumbnail" id="box">
      <img src="http://renswijnmalen.nl/bootstrap/desktop_mobile.png" alt="..."/>
      <div class="caption">
        <h3>Thumbnail label</h3>
        <p>...</p>
        <p><a href="#" type="button" class="btn btn-primary">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
      </div>
    </div>
  </div>
  
      <div class="col-md-3" >
    <div class="thumbnail" id="box">
      <img src="http://renswijnmalen.nl/bootstrap/desktop_mobile.png" alt="..."/>
      <div class="caption">
        <h3>Thumbnail label</h3>
        <p>...</p>
        <p><a href="#" type="button" class="btn btn-primary">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
      </div>
    </div>
  </div>
  
</div>
  
</div><!-- fim row -->



</body>
</html>